<%@ Control CodeBehind="ImportView.ascx.cs" Language="c#" AutoEventWireup="True" Inherits="SplendidCRM.Import.ImportView" %>
<script runat="server">
/**********************************************************************************************************************
 * SplendidCRM is a Customer Relationship Management program created by SplendidCRM Software, Inc. 
 * Copyright (C) 2005-2011 SplendidCRM Software, Inc. All rights reserved.
 * 
 * This program is free software: you can redistribute it and/or modify it under the terms of the 
 * GNU Affero General Public License as published by the Free Software Foundation, either version 3 
 * of the License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
 * See the GNU Affero General Public License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License along with this program. 
 * If not, see <http://www.gnu.org/licenses/>. 
 * 
 * You can contact SplendidCRM Software, Inc. at email address support@splendidcrm.com. 
 * 
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3, 
 * the Appropriate Legal Notices must display the following words on all interactive user interfaces: 
 * "Copyright (C) 2005-2011 SplendidCRM Software, Inc. All rights reserved."
 *********************************************************************************************************************/
</script>
<div id="divImportView">
	<%@ Register TagPrefix="SplendidCRM" Tagname="ModuleHeader" Src="~/_controls/ModuleHeader.ascx" %>
	<SplendidCRM:ModuleHeader ID="ctlModuleHeader" Module="Import" Title="Import.LBL_MODULE_NAME" EnableModuleLabel="false" EnablePrint="false" HelpName="ImportView" EnableHelp="true" Runat="Server" />
	<p>
	<%@ Register TagPrefix="SplendidCRM" Tagname="DynamicButtons" Src="~/_controls/DynamicButtons.ascx" %>
	<SplendidCRM:DynamicButtons ID="ctlDynamicButtons" Visible="<%# !PrintView %>" ShowRequired="true" Runat="Server" />
	</p>

	<script type="text/javascript">
	function SelectWizardTab(key)
	{
		for ( var i = 1; i <= 6; i++ )
		{
			var sListClass = '';
			var sLinkClass = '';
			var sListStyle = 'none';

			if ( key == i )
			{
				sListClass = 'active' ;
				sLinkClass = 'current';
				sListStyle = 'block'  ;
			}
			document.getElementById('liImportStep'   + i).className     = sListClass;
			document.getElementById('linkImportStep' + i).className     = sLinkClass;
			document.getElementById('divImportStep'  + i).style.display = sListStyle;
		}
		document.getElementById('<%= txtACTIVE_TAB.ClientID %>').value = key;
	}
	function SelectSourceFormat()
	{
		var radEXCEL            = document.getElementById('<%= radEXCEL           .ClientID %>');
		var radXML_SPREADSHEET  = document.getElementById('<%= radXML_SPREADSHEET .ClientID %>');
		var radXML              = document.getElementById('<%= radXML             .ClientID %>');
		var radSALESFORCE       = document.getElementById('<%= radSALESFORCE      .ClientID %>');
		var radACT_2005         = document.getElementById('<%= radACT_2005        .ClientID %>');
		var radDBASE            = document.getElementById('<%= radDBASE           .ClientID %>');
		var radCUSTOM_CSV       = document.getElementById('<%= radCUSTOM_CSV      .ClientID %>');
		var radCUSTOM_TAB       = document.getElementById('<%= radCUSTOM_TAB      .ClientID %>');
		var radCUSTOM_DELIMITED = document.getElementById('<%= radCUSTOM_DELIMITED.ClientID %>');
		
		document.getElementById('tblInstructionsExcel'         ).style.display = radEXCEL           .checked ? 'inline' : 'none';
		document.getElementById('tblInstructionsXmlSpreadsheet').style.display = radXML_SPREADSHEET .checked ? 'inline' : 'none';
		document.getElementById('tblInstructionsXML'           ).style.display = radXML             .checked ? 'inline' : 'none';
		document.getElementById('tblInstructionsSalesForce'    ).style.display = radSALESFORCE      .checked ? 'inline' : 'none';
		document.getElementById('tblInstructionsAct'           ).style.display = radACT_2005        .checked ? 'inline' : 'none';
		document.getElementById('tblInstructionsDbase'         ).style.display = radDBASE           .checked ? 'inline' : 'none';
		document.getElementById('tblInstructionsCommaDelimited').style.display = radCUSTOM_CSV      .checked ? 'inline' : 'none';
		document.getElementById('tblInstructionsTabDelimited'  ).style.display = radCUSTOM_TAB      .checked ? 'inline' : 'none';
		document.getElementById('tblInstructionsCommaDelimited').style.display = radCUSTOM_DELIMITED.checked ? 'inline' : 'none';
		document.getElementById('divCUSTOM_DELIMITER_VAL'      ).style.display = radCUSTOM_DELIMITED.checked ? 'inline' : 'none';

		var sImportModule = '<%= sImportModule %>';
		document.getElementById('tblNotesAccounts'     ).style.display = (sImportModule == 'Accounts'     ) ? 'inline' : 'none';
		document.getElementById('tblNotesContacts'     ).style.display = (sImportModule == 'Contacts'     ) ? 'inline' : 'none';
		document.getElementById('tblNotesOpportunities').style.display = (sImportModule == 'Opportunities') ? 'inline' : 'none';
}
    <%-- 
	function MoveLeftToRight(sLeftID, sRightID, bReverse) {
	    alert("132124");
		var lstLeft  = document.getElementById(sLeftID );
		var lstRight = document.getElementById(sRightID);
		var sModuleName = '<%= sImportModule %>';
		for ( i=0; i < lstLeft.options.length ; i++ )
		{
			if ( lstLeft.options[i].selected == true )
			{
				var oOption = document.createElement("OPTION");
				if ( bReverse == 1 )
					oOption.text  = sModuleName + ': ' + lstLeft.options[i].text;
				else if ( lstLeft.options[i].text.indexOf(': ') >= 0 )
					oOption.text  = lstLeft.options[i].text.substring(lstLeft.options[i].text.indexOf(': ')+2);
				else
					oOption.text  = lstLeft.options[i].text;
				oOption.value = lstLeft.options[i].value;
				lstRight.options.add(oOption);
			}
		}
		for ( i=lstLeft.options.length-1; i >= 0  ; i-- )
		{
			if ( lstLeft.options[i].selected == true )
			{
				// 10/11/2006 Paul.  Firefox does not support options.remove(), so just set the option to null. 
				lstLeft.options[i] = null;
			}
		}
		// 08/05/2005 Paul. Don't use the sLeftID & sRightID values as they can be reversed. 
        
        CopyToHidden('<%= ctlKeyColumnChooser.lstLeft.ClientID  %>', '<%= ctlKeyColumnChooser.txtLeft.ClientID  %>');
        CopyToHidden('<%= ctlOverWriteColumnChooser.lstLeft.ClientID %>', '<%= ctlOverWriteColumnChooser.txtLeft.ClientID %>');
        
	}--%>
	</script>                  

	<input id="txtACTIVE_TAB" type="hidden" runat="server" />
	<ul class="tablist">
		<li id="liImportStep1" class="active"><a id="linkImportStep1" href="javascript:SelectWizardTab(1);" class="current"><%= "1. " + L10n.Term("Import.LBL_IMPORT_STEP_SELECT_SOURCE"   ) %></a></li>
		<li id="liImportStep2" class=""      ><a id="linkImportStep2" href="javascript:SelectWizardTab(2);" class=""       ><%= "2. " + L10n.Term("Import.LBL_IMPORT_STEP_SPECIFY_DEFAULTS") %></a></li>
		<li id="liImportStep3" class=""      ><a id="linkImportStep3" href="javascript:SelectWizardTab(3);" class=""       ><%= "3. " + L10n.Term("Import.LBL_IMPORT_STEP_UPLOAD_FILE"     ) %></a></li>
		<li id="liImportStep4" class=""      ><a id="linkImportStep4" href="javascript:SelectWizardTab(4);" class=""       ><%= "4. " + L10n.Term("Import.LBL_IMPORT_STEP_MAP_FIELDS"      ) %></a></li>
		<%--<li id="liImportStep5" class=""      ><a id="linkImportStep5" href="javascript:SelectWizardTab(5);" class=""       ><%= "5. " + L10n.Term("Import.LBL_IMPORT_STEP_DUPLICATE_FILTER") %></a></li> --%>
		<li id="liImportStep5" class=""      ><a id="linkImportStep5" href="javascript:SelectWizardTab(5);" class=""       ><%= "5. " + L10n.Term("Import.LBL_IMPORT_STEP_RESULTS"         ) %></a></li>
	</ul>
	<div id="divImportStep1" style="DISPLAY:none">
		<asp:Table SkinID="tabForm" runat="server">
			<asp:TableRow>
				<asp:TableCell>
					<table class="tabEditView">
						<tr>
							<td class="dataField" colspan="2"><h4><asp:Label Text='<%# L10n.Term("Import.LBL_WHAT_IS") %>' runat="server" /></h4></td>
						</tr>
						<tr>
							<td width="35%" class="dataField">
								<nobr>
									<asp:RadioButton ID="radEXCEL"            GroupName="radSOURCE" Text='<%# L10n.Term("Import.LBL_EXCEL"           ) %>' CssClass="checkbox" runat="server" /><br />
									<div style="display:none">
                                    <asp:RadioButton ID="radXML_SPREADSHEET"  GroupName="radSOURCE" Text='<%# L10n.Term("Import.LBL_XML_SPREADSHEET" ) %>' CssClass="checkbox" runat="server" /><br />
									<asp:RadioButton ID="radXML"              GroupName="radSOURCE" Text='<%# L10n.Term("Import.LBL_XML"             ) %>' CssClass="checkbox" runat="server" /><br />
									<asp:RadioButton ID="radSALESFORCE"       GroupName="radSOURCE" Text='<%# L10n.Term("Import.LBL_SALESFORCE"      ) %>' CssClass="checkbox" runat="server" /><br />
									<asp:RadioButton ID="radACT_2005"         GroupName="radSOURCE" Text='<%# L10n.Term("Import.LBL_ACT_2005"        ) %>' CssClass="checkbox" runat="server" /><br />
									<asp:RadioButton ID="radDBASE"            GroupName="radSOURCE" Text='<%# L10n.Term("Import.LBL_DBASE"           ) %>' CssClass="checkbox" runat="server" /><br />
									<asp:RadioButton ID="radCUSTOM_CSV"       GroupName="radSOURCE" Text='<%# L10n.Term("Import.LBL_CUSTOM_CSV"      ) %>' CssClass="checkbox" runat="server" /><br />
									<asp:RadioButton ID="radCUSTOM_TAB"       GroupName="radSOURCE" Text='<%# L10n.Term("Import.LBL_CUSTOM_TAB"      ) %>' CssClass="checkbox" runat="server" /><br />
									<asp:RadioButton ID="radCUSTOM_DELIMITED" GroupName="radSOURCE" Text='<%# L10n.Term("Import.LBL_CUSTOM_DELIMETED") %>' CssClass="checkbox" runat="server" /><br />
									<div id="divCUSTOM_DELIMITER_VAL" style="DISPLAY: none">
										&nbsp; &nbsp; <%= L10n.Term("Import.LBL_CUSTOM_DELIMETER") %> <asp:TextBox ID="txtCUSTOM_DELIMITER_VAL" MaxLength="1" size="3" runat="server" />
									</div>
                                    </div>
								</nobr>
							</td>
							<td valign="top">
								<table border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td class="dataLabel"><h4><asp:Label Text='<%# L10n.Term("Import.LBL_NAME") %>' runat="server" /></h4></td>
										<td class="dataField">
											<asp:TextBox ID="txtNAME" TabIndex="2" size="35" MaxLength="150" Runat="server" />
											<asp:Button ID="btnSave" CommandName="Import.Save" OnCommand="Page_Command" CssClass="button" Text='<%# "  " + L10n.Term("Import.LBL_SAVE_BUTTON_LABEL") + "  " %>' ToolTip='<%# L10n.Term("Import.LBL_SAVE_BUTTON_TITLE") %>' Runat="server" />
											<asp:RequiredFieldValidator ID="reqNAME" ControlToValidate="txtNAME" ErrorMessage='<%# L10n.Term(".ERR_REQUIRED_FIELD") %>' CssClass="required" Enabled="false" EnableClientScript="false" EnableViewState="false" Display="Dynamic" Runat="server" />
										</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
					<br />
					<%@ Register TagPrefix="SplendidCRM" Tagname="ListHeader" Src="~/_controls/ListHeader.ascx" %>

                    <SplendidCRM:ListHeader Visible="false" Title="Import.LBL_MY_SAVED" Runat="Server" />
                    <SplendidCRM:SplendidGrid id="grdMySaved" Visible="false" AllowPaging="false" AllowSorting="false" EnableViewState="true" runat="server">
						<Columns>
							<asp:TemplateColumn HeaderText="Import.LBL_LIST_NAME"  SortExpression="NAME" ItemStyle-Width="85%" ItemStyle-CssClass="listViewTdLinkS1">
								<ItemTemplate>
									<asp:HyperLink NavigateUrl='<%# Request.Path + "?ID=" + Sql.ToString(Eval("ID")) %>' CssClass="listViewTdToolsS1" Text='<%# DataBinder.Eval(Container.DataItem, "NAME") %>' runat="server" />
								</ItemTemplate>
							</asp:TemplateColumn>
							<asp:TemplateColumn HeaderText="" ItemStyle-HorizontalAlign="Right" ItemStyle-Wrap="false">
								<ItemTemplate>
									<span onclick="return confirm('<%= L10n.TermJavaScript(".NTC_DELETE_CONFIRMATION") %>')">
										<asp:ImageButton CommandName="Import.Delete" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ID") %>' OnCommand="Page_Command" CssClass="listViewTdToolsS1" AlternateText='<%# L10n.Term(".LNK_DELETE") %>' SkinID="delete_inline" Runat="server" />
										<asp:LinkButton CommandName="Import.Delete" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ID") %>' OnCommand="Page_Command" CssClass="listViewTdToolsS1" Text='<%# L10n.Term(".LNK_DELETE") %>' Runat="server" />
									</span>
								</ItemTemplate>
							</asp:TemplateColumn>
						</Columns>
					</SplendidCRM:SplendidGrid>
                    <%-- <SplendidCRM:ListHeader Visible="<%# !PrintView %>" Title="Import.LBL_MY_SAVED" Runat="Server" />
					<SplendidCRM:SplendidGrid id="grdMySaved" AllowPaging="false" AllowSorting="false" EnableViewState="true" runat="server">
						<Columns>
							<asp:TemplateColumn HeaderText="Import.LBL_LIST_NAME"  SortExpression="NAME" ItemStyle-Width="85%" ItemStyle-CssClass="listViewTdLinkS1">
								<ItemTemplate>
									<asp:HyperLink NavigateUrl='<%# Request.Path + "?ID=" + Sql.ToString(Eval("ID")) %>' CssClass="listViewTdToolsS1" Text='<%# DataBinder.Eval(Container.DataItem, "NAME") %>' runat="server" />
								</ItemTemplate>
							</asp:TemplateColumn>
							<asp:TemplateColumn HeaderText="" ItemStyle-HorizontalAlign="Right" ItemStyle-Wrap="false">
								<ItemTemplate>
									<span onclick="return confirm('<%= L10n.TermJavaScript(".NTC_DELETE_CONFIRMATION") %>')">
										<asp:ImageButton CommandName="Import.Delete" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ID") %>' OnCommand="Page_Command" CssClass="listViewTdToolsS1" AlternateText='<%# L10n.Term(".LNK_DELETE") %>' SkinID="delete_inline" Runat="server" />
										<asp:LinkButton  CommandName="Import.Delete" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ID") %>' OnCommand="Page_Command" CssClass="listViewTdToolsS1" Text='<%# L10n.Term(".LNK_DELETE") %>' Runat="server" />
									</span>
								</ItemTemplate>
							</asp:TemplateColumn>
						</Columns>
					</SplendidCRM:SplendidGrid>--%>

                    <!-- Imports list-->
                    <SplendidCRM:ListHeader Visible="true" Title="Imported list" Runat="Server" />
                    <SplendidCRM:SplendidGrid id="grdImportedList" Visible="true" AllowPaging="true" AllowSorting="true" EnableViewState="true" runat="server">
						<Columns>
							<asp:TemplateColumn HeaderText="File name"  SortExpression="IMPORT_FILENAME">
								<ItemTemplate>
									<asp:Label Text='<%#Eval("IMPORT_FILENAME") %>' runat="server" />
								</ItemTemplate>
							</asp:TemplateColumn>
							<asp:TemplateColumn HeaderText="Import date"  SortExpression="IMPORT_TIME">
								<ItemTemplate>
									<asp:Label Text='<%#Eval("IMPORT_TIME") %>' runat="server" />
								</ItemTemplate>
							</asp:TemplateColumn>
                            <asp:BoundColumn DataField="TOTAL_ROWS" HeaderText="Total rows" />
                            <asp:BoundColumn DataField="TOTAL_SUCCESS_ROWS" HeaderText="Success" />
                            <asp:BoundColumn DataField="TOTAL_DUPLICATE_ROWS" HeaderText="Duplicate" />
							<asp:TemplateColumn HeaderText="Download file">
								<ItemTemplate>
									<asp:HyperLink Text="Download" NavigateUrl='<%#"~/ShowFile.ashx?IMPORT_ID=" + Eval("IMPORT_ID") %>' runat="server"/>
								</ItemTemplate>
							</asp:TemplateColumn>
						</Columns>
					</SplendidCRM:SplendidGrid>

				</asp:TableCell>
			</asp:TableRow>
		</asp:Table>
	</div>
	<div id="divImportStep2" style="DISPLAY:none">
		<asp:PlaceHolder ID="phDefaultsView" Runat="server" />
	</div>
	<div id="divImportStep3" style="DISPLAY:none">
		<asp:Table SkinID="tabForm" runat="server">
			<asp:TableRow>
				<asp:TableCell>
					<table id="tblInstructionsExcel" width="100%" cellpadding="0" cellspacing="0" border="0" style="DISPLAY: none">
						<tr>
							<td>
								<%= L10n.Term("Import.LBL_IMPORT_EXCEL_TITLE") %>
							</td>
						</tr>
					</table>
					<table id="tblInstructionsXmlSpreadsheet" width="100%" cellpadding="0" cellspacing="0" border="0" style="DISPLAY: none">
						<tr>
							<td>
								<%= L10n.Term("Import.LBL_IMPORT_XML_SPREADSHEET_TITLE") %>
							</td>
						</tr>
					</table>
					<table id="tblInstructionsXML" width="100%" cellpadding="0" cellspacing="0" border="0" style="DISPLAY: none">
						<tr>
							<td>
								<%= L10n.Term("Import.LBL_IMPORT_XML_TITLE") %>
								<pre>
			&lt;xml&gt;
			   &lt;<%= sImportModule.ToLower() %>&gt;
				  &lt;id&gt;&lt;/id&gt;
				  &lt;name&gt;&lt;/name&gt;
			   &lt;/<%= sImportModule.ToLower() %>&gt;
			&lt;/xml&gt;</pre>
							</td>
						</tr>
					</table>
					<table id="tblInstructionsSalesForce" width="100%" cellpadding="0" cellspacing="0" border="0" style="DISPLAY: none">
						<tr>
							<td>
								<%= L10n.Term("Import.LBL_IMPORT_SF_TITLE") %>
							</td>
						</tr>
					</table>
					<table id="tblInstructionsAct" width="100%" cellpadding="0" cellspacing="0" border="0" style="DISPLAY: none">
						<tr>
							<td>
								<%= L10n.Term("Import.LBL_IMPORT_ACT_TITLE") %>
							</td>
						</tr>
					</table>
					<table id="tblInstructionsDbase" width="100%" cellpadding="0" cellspacing="0" border="0" style="DISPLAY: none">
						<tr>
							<td>
								<%= L10n.Term("Import.LBL_IMPORT_DBASE_TITLE") %>
							</td>
						</tr>
						<tr>
							<td>
								<%= L10n.Term("Import.LBL_IMPORT_DBASE") %>
							</td>
						</tr>
					</table>
					<table id="tblInstructionsCommaDelimited" width="100%" cellpadding="0" cellspacing="0" border="0" style="DISPLAY: none">
						<tr>
							<td>
								<%= L10n.Term("Import.LBL_IMPORT_CUSTOM_TITLE") %>
							</td>
						</tr>
					</table>
					<table id="tblInstructionsTabDelimited" width="100%" cellpadding="0" cellspacing="0" border="0" style="DISPLAY: none">
						<tr>
							<td>
								<%= L10n.Term("Import.LBL_IMPORT_TAB_TITLE") %>
							</td>
						</tr>
					</table>
					<br>
					<table border="0" cellspacing="0" cellpadding="0" width="100%">
						<tr>
							<td align="left" class="dataLabel" colspan="4">
								<%= L10n.Term("Import.LBL_SELECT_FILE") %>&nbsp;<asp:Label CssClass="required" Text='<%# L10n.Term(".LBL_REQUIRED_SYMBOL") %>' Runat="server" />
								<asp:RequiredFieldValidator ID="reqFILENAME" ControlToValidate="fileIMPORT" ErrorMessage='<%# L10n.Term(".ERR_REQUIRED_FIELD") %>' CssClass="required" Enabled="false" EnableClientScript="false" EnableViewState="false" Runat="server" />
							</td>
						</tr>
						<tr>
							<td class="dataLabel">
								<input id="fileIMPORT" type="file" size="60" MaxLength="255" runat="server" />
								<asp:Button ID="btnUpload" CommandName="Import.Upload" OnCommand="Page_Command" CssClass="button" Text='<%# "  " + L10n.Term("Import.LBL_UPLOAD_BUTTON_LABEL" ) + "  " %>' ToolTip='<%# L10n.Term("Import.LBL_UPLOAD_BUTTON_TITLE" ) %>' Runat="server" />
							</td>
						</tr>
						<tr>
							<td class="dataField">
								<%= L10n.Term("Import.LBL_HAS_HEADER") %>&nbsp;
								<asp:CheckBox ID="chkHasHeader" CssClass="checkbox" Runat="server" />
							</td>
						</tr>
					</table>
				</asp:TableCell>
			</asp:TableRow>
		</asp:Table>
	</div>
	<div id="divImportStep4" style="DISPLAY:none">
		<asp:Table SkinID="tabForm" runat="server">
			<asp:TableRow>
				<asp:TableCell>
					<table width="100%" cellpadding="0" cellspacing="0" border="0" visible="true">
						<tr>
							<td align="right" nowrap>
								<asp:Label CssClass="required" Text='<%# L10n.Term(".LBL_REQUIRED_SYMBOL") %>' Runat="server" /> <%= L10n.Term(".NTC_REQUIRED") %>
							</td>
						</tr>
						<tr>
							<td>
								<%= L10n.Term("Import.LBL_SELECT_FIELDS_TO_MAP") %>
							</td>
						</tr>
					</table>
					<table id="tblImportMappings" class="tabDetailView" runat="server" />

					<table id="tblNotesAccounts" width="100%" cellpadding="0" cellspacing="0" border="0" style="DISPLAY: none">
						<tr>
							<td>
								<br />
								<b><%= L10n.Term("Import.LBL_NOTES") %></b>
								<ul>
									<li><%= L10n.Term("Import.LBL_ACCOUNTS_NOTE_1") %></li>
									<!--
									<li><%= L10n.Term("Import.LBL_ACCOUNTS_NOTE_2") %></li>
									-->
								</ul>
							</td>
						</tr>
					</table>
					<table id="tblNotesContacts" width="100%" cellpadding="0" cellspacing="0" border="0" style="DISPLAY: none">
						<tr>
							<td>
								<br />
								<b><%= L10n.Term("Import.LBL_NOTES") %></b>
								<ul>
									<li><%= L10n.Term("Import.LBL_CONTACTS_NOTE_1") %></li>
									<!--
									<li><%= L10n.Term("Import.LBL_CONTACTS_NOTE_2") %></li>
									<li><%= L10n.Term("Import.LBL_CONTACTS_NOTE_3") %></li>
									<li><%= L10n.Term("Import.LBL_CONTACTS_NOTE_4") %></li>
									-->
								</ul>
							</td>
						</tr>
					</table>
					<table id="tblNotesOpportunities" width="100%" cellpadding="0" cellspacing="0" border="0" style="DISPLAY: none">
						<tr>
							<td>
								<br />
								<b><%= L10n.Term("Import.LBL_NOTES") %></b>
								<ul>
									<li><%= L10n.Term("Import.LBL_OPPORTUNITIES_NOTE_1") %></li>
								</ul>
							</td>
						</tr>
					</table>
				</asp:TableCell>
			</asp:TableRow>
		</asp:Table>
	</div>
    <%-- 
	<div id="divImportStep5" style="DISPLAY:none">
		<asp:Table SkinID="tabForm" runat="server">
			<asp:TableRow>
				<asp:TableCell>
					<%@ Register TagPrefix="SplendidCRM" Tagname="Chooser" Src="~/_controls/Chooser.ascx" %>
					<SplendidCRM:Chooser ID="ctlDuplicateFilterChooser" ChooserTitle="Import.LBL_DUPLICATE_FILTER" LeftTitle="Import.LBL_FILTER_COLUMNS" RightTitle="Import.LBL_AVAILABLE_COLUMNS" Enabled="true" Runat="Server" />
				</asp:TableCell>
			</asp:TableRow>
		</asp:Table>
	</div>
    --%>
	<div id="divImportStep5" style="DISPLAY:none">
		<asp:Table SkinID="tabForm" runat="server">
			<asp:TableRow>
				<asp:TableCell>
					<asp:Label ID="lblStatus"         Font-Bold="true" runat="server" /><br />
					<asp:Label ID="lblSuccessCount"   runat="server" /><br />
					<asp:Label ID="lblDuplicateCount" runat="server" /><br />
					<asp:Label ID="lblFailedCount"    runat="server" /><br />
					<br />
					<%= L10n.Term("Import.LBL_USE_TRANSACTION") %><asp:CheckBox ID="chkUseTransaction" Checked="True" CssClass="checkbox" runat="server" />
					<br />
                    
                    Overwrite all existed data: <asp:CheckBox ID="chkOverWriteAll" Checked="false" CssClass="checkbox" runat="server" />
                    <%@ Register TagPrefix="SplendidCRM" Tagname="Chooser" Src="~/_controls/Chooser.ascx" %>
                    <table border="0">
                        <tr>
                            <td><SplendidCRM:Chooser ID="ctlKeyColumnChooser" ChooserTitle="Choose key columns" LeftTitle="Key columns" RightTitle="Column list" Enabled="true" Runat="Server" /></td>    
                            <td><SplendidCRM:Chooser ID="ctlOverWriteColumnChooser" ChooserTitle="Choose overwrite columns" LeftTitle="Columns to overwrite data" RightTitle="Column list" Enabled="true" Runat="Server" /></td>
                            
                        </tr>
                    </table>
                    
                    
					<%-- <SplendidCRM:ListHeader ID="ctlListHeader" Visible="<%# !PrintView %>" Title="Import.LBL_LAST_IMPORTED" Runat="Server" /> --%>
                    <SplendidCRM:ListHeader ID="ctlListHeader" Visible="<%# !PrintView %>" Title="CONFLICTED ROWS" Runat="Server" />
					<SplendidCRM:SplendidGrid id="grdMain" AllowPaging="<%# !PrintView %>" AllowSorting="true" EnableViewState="true" runat="server">
					</SplendidCRM:SplendidGrid>
				</asp:TableCell>
			</asp:TableRow>
		</asp:Table>
	</div>
	<br>
	<script type="text/javascript">
		SelectWizardTab(<%= txtACTIVE_TAB.Value %>);
		SelectSourceFormat();
	</script>
<%
if ( bDebug )
{
	Response.Write("<div style=\"width: 1200; border: 1px solid black; overflow: hidden; \">");
	XmlUtil.Dump(xmlMapping);
	Response.Write("</div>");
	Response.Write("<br />");

	/*
	Response.Write("<div style=\"width: 1200; border: 1px solid black; overflow: hidden; \">");
	XmlUtil.Dump(xml);
	Response.Write("</div>");
	Response.Write("<br />");
	*/

	Response.Write("<div style=\"width: 1200; border: 1px solid black; overflow: hidden; \">");
	Response.Write("<pre>");
	Response.Write(sbImport.ToString());
	Response.Write("</pre>");
	Response.Write("</div>");
}
%>
</div>


